home *** CD-ROM | disk | FTP | other *** search
Visual Basic class definition | 1999-09-02 | 1.2 KB | 52 lines |
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "clsDateList"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = False
- Option Explicit
-
- Private mnCount As Integer
- Private madtDates() As Date
-
- Property Get Count() As Integer
- Count = mnCount
- End Property
-
- Property Get FileDate(nIndex As Integer) As Date
- If nIndex < 0 Or nIndex > mnCount - 1 Then
- FileDate = DateSerial(1900, 1, 1)
- Else
- FileDate = madtDates(nIndex)
- End If
- End Property
-
- Public Sub AddItem(dtFileDate As Date)
- Dim i As Integer
-
- For i = 0 To mnCount - 1
- If madtDates(i) = dtFileDate Then
- Exit Sub
- End If
- Next i
-
- If mnCount = UBound(madtDates) - LBound(madtDates) + 1 Then
- ReDim Preserve madtDates(0 To mnCount + 9) As Date
- End If
-
- madtDates(mnCount) = dtFileDate
- mnCount = mnCount + 1
- End Sub
-
- Private Sub Class_Initialize()
- mnCount = 0
- ReDim madtDates(0 To 9) As Date
- End Sub
-